Example Presentation

How to use quartoMorphSvg

Installing package:

if(!"quartoMorphSvg" %in% rownames(installed.packages())){
  devtools::install_github("klingelhoefer/quartoMorphSvg")
}
library(quartoMorphSvg)

To display an image, you can simply write inline (replace with your path(s):

`r morph_svg("path/to/img_1.svg", "path/to/img_1.svg")` 

Moderation Example

X Y Z

To generate the image above:

`r morph_svg(folder = "images/moderation, height = "400px")`

Mediation Example

morph_svg(
  folder = "images/mediation", 
  height = "12em", 
  animation_duration = .5, 
  animation_curve = "cubic-bezier(0.76, 0, 0.24, 1)"
)
M X Y

Tidyverse Logo Example

Any order can be specified/repeated an arbitrary amount of times, e.g.,

`r morph_svg("images/tidyverse/1.svg", "images/tidyverse/2.svg", "images/tidyverse/3.svg", "images/tidyverse/2.svg", "images/tidyverse/1.svg", height = "12em")`

Note that complex images may take a while to render

Monstera Example

The generated output can be used in any other HTML document, and even standalone. In non-quarto documents it will only react to clicking, thus, click should be TRUE (the default).

`r morph_svg(folder = "images/monstera/", animation_duration = 1.25, click = F, height = "14em")`